import request from '@/config/axios'

// 银行卡 VO
export interface BankCardVO {
  id: number // 主键
}

// 银行卡 API
export const BankCardApi = {
  // 查询银行卡分页
  getBankCardPage: async (params: any) => {
    return await request.get({ url: `/wo/bank-card/page`, params })
  },

  // 查询银行卡详情
  getBankCard: async (id: number) => {
    return await request.get({ url: `/wo/bank-card/get?id=` + id })
  },

  // 新增银行卡
  createBankCard: async (data: BankCardVO) => {
    return await request.post({ url: `/wo/bank-card/create`, data })
  },

  // 修改银行卡
  updateBankCard: async (data: BankCardVO) => {
    return await request.put({ url: `/wo/bank-card/update`, data })
  },

  // 删除银行卡
  deleteBankCard: async (id: number) => {
    return await request.delete({ url: `/wo/bank-card/delete?id=` + id })
  },

  // 导出银行卡 Excel
  exportBankCard: async (params) => {
    return await request.download({ url: `/wo/bank-card/export-excel`, params })
  }
}